package model;

/**
 * @author cl412205
 * 
 */
public class Pezzo implements IPezzo {

	private String codeID;
	private int date;
	private String sala;
	private String description;

	public String getCodeID() {
		return codeID;
	}

	public void setCodeID(String codeID) {
		if (codeID.length() > 8) {
			System.out.println("codeID troppo lungo");
		}
		this.codeID = codeID;
		
	}

	public int getDate() {
		return date;
	}

	public void setDate(int date) {
		if (date < 800 || date > 2000) {
			System.out.println("data non valida");
			
		}
		this.date = date;
	}

	public String getSala() {
		return sala;
	}

	public void setSala(String sala) {
		this.sala = sala;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}
	
//	
//	public int compareTo(ProxyPezzo pezzo) {
//		if (sala.compareTo(pezzo.getSala()) != 0 ){
//			return sala.compareTo(pezzo.getSala());
//		} else if(Integer.compare(date, pezzo.getDate()) != 0){
//			return Integer.compare(date, pezzo.getDate());
//		} else if (codeID.compareToIgnoreCase(pezzo.getCodeID()) != 0){
//			return codeID.compareToIgnoreCase(pezzo.getCodeID());
//		}
//		return 0;
//	}

}
